package com.core.config;

import org.springframework.boot.CommandLineRunner;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author: 孙常胜
 * @CreateTime: 2021/7/9 11:02
 * @Description:
 */
@Component
public class ServerStart implements CommandLineRunner {
    @Resource
    private Server server;

    @Override
    @Async
    public void run(String... args) {
        server.startServer();
    }
}
